﻿using System;
using System.Linq;
using System.Text;
using SqlSugar;

namespace Crossroad.System.Admin.Model
{
    ///<summary>
    ///系统角色
    ///</summary>
    [SugarTable("admin_role")]
    public partial class Role : ModelContext
    {
        public Role()
        {
            LoadDefVal();
        }

        public Role(bool loadDef)
        {
            if (loadDef)
                LoadDefVal();
        }

        private void LoadDefVal()
        {
            this.deleteTime = Convert.ToInt32("0");
            this.updatorId = Convert.ToInt32("0");
            this.deletorId = Convert.ToInt32("0");
            this.isDeleted = Convert.ToInt32("0");
            this.createTime = Convert.ToInt32("0");
            this.sort = Convert.ToInt32("99");
            this.creatorId = Convert.ToInt32("0");
            this.updateTime = Convert.ToInt32("0");
        }

        /// <summary>
        /// Desc:删除时间
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "delete_time")]
        public int? deleteTime { get; set; }

        /// <summary>
        /// Desc:修改人
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "updator_id")]
        public int? updatorId { get; set; }

        /// <summary>
        /// Desc:删除人
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "deletor_id")]
        public int? deletorId { get; set; }

        /// <summary>
        /// Desc:描述
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string description { get; set; }

        /// <summary>
        /// Desc:id
        /// Default:
        /// Nullable:False
        /// </summary>           
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int id { get; set; }

        /// <summary>
        /// Desc:伪删除标记 1.删除,0.未删除
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "is_deleted")]
        public int? isDeleted { get; set; }

        /// <summary>
        /// Desc:角色名
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string name { get; set; }

        /// <summary>
        /// Desc:创建时间
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "create_time")]
        public int? createTime { get; set; }

        /// <summary>
        /// Desc:排序
        /// Default:99
        /// Nullable:False
        /// </summary>           
        public int sort { get; set; }

        /// <summary>
        /// Desc:创建人
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "creator_id")]
        public int? creatorId { get; set; }

        /// <summary>
        /// Desc:修改时间
        /// Default:0
        /// Nullable:True
        /// </summary>           
        [SugarColumn(ColumnName = "update_time")]
        public int? updateTime { get; set; }

    }
}
